package com.stx.blog.action;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.stx.blog.service.BlogCellectService;
import com.stx.blog.vo.BlogCellectVo;

public class BlogCellectAction extends ActionSupport {

	private BlogCellectService service;

	// 博客信息列表
	private List<BlogCellectVo> blgcltList = new ArrayList<BlogCellectVo>();

	// 查询条件
	private BlogCellectVo criteria = null;

	// 博客收藏信息
	private BlogCellectVo BlogCellect = null;

	// 博文号
	private String cno = null;

	public String List() {

		blgcltList = service.list(new BlogCellectVo());

		return "list";
	}

	public String del() {

		service.delBlogCellect(cno);

		return "list";
	}

	public String add() {

		service.addBlogCellect(BlogCellect);

		return "list";
	}

	public String findBlogCellectBySno() {

		service.findBlogCellectForUpdate(cno);

		return "update";
	}

	public void setService(BlogCellectService service) {
		this.service = service;
	}

	public List<BlogCellectVo> getBlgcltList() {

		return blgcltList;
	}

	public void setBlgcltList(List<BlogCellectVo> blgcltList) {

		this.blgcltList = blgcltList;
	}

	public BlogCellectVo getCriteria() {

		return criteria;
	}

	public void setCriteria(BlogCellectVo criteria) {

		this.criteria = criteria;
	}

	public String getCno() {

		return cno;
	}

	public void setCno(String cno) {

		this.cno = cno;
	}

	public BlogCellectVo getBlogCellect() {

		return BlogCellect;
	}

	public void setBlogCellect(BlogCellectVo BlogCellect) {

		this.BlogCellect = BlogCellect;
	}

}
